#ifndef REGISTER_H
#define REGISTER_H

#include <QtNetwork>
#include "ui_register.h"
#define FROMSTR(a) (QString::fromUtf8((a)))

class Register : public QWidget, public Ui::Register
{
	Q_OBJECT
public:
	Register(QWidget *parent = 0);
private:
	QNetworkAccessManager *manager;
	QNetworkAccessManager *managerImage;
	QNetworkRequest request;
	QNetworkRequest requestImage;
	QNetworkReply *reply;
	QNetworkReply *replyImage;
	QSslConfiguration sslCfg;
	QTimer *timer;
	int time;
	void setRegisterDefault();
	void sendShortMsgRequest();
	void sendGraphicsRequest();
private slots:
	void on_editPhone_textChanged();
	void on_commitPhone_clicked();
	void on_editShortMsg_textChanged();
	void on_editGraphics_textChanged();
	void on_reset_clicked();
	void on_regetGraphics_clicked();
	void checkPhone();
	void checkRegister();
	void setImage();
	void lcdDecrease();
};

#endif /* REGISTER_H */
